home *** CD-ROM | disk | FTP | other *** search
/ Software Vault: The Gold Collection / Software Vault - The Gold Collection (American Databankers) (1993).ISO / cdr49 / strpp300.zip / STRNG.BAT < prev    next >
DOS Batch File  |  1993-04-11  |  3KB  |  109 lines

  1. @echo off
  2. cls
  3. echo  
  4. if %1==-u goto uninstall
  5.  
  6. :install
  7. echo       String++ Installation
  8. echo ---------------------------------
  9. if %1!==! goto syntax
  10. if not exist %1\*.* goto badpath1
  11. if not exist %1\classlib\*.* goto badpath1
  12. echo  
  13. echo This will install String++ in the
  14. echo Borland Container Class Library.
  15. echo  
  16. echo Backup files will be named *.BCC
  17. echo in the classlib directories.
  18. echo  
  19. echo Press Ctrl-Break to abort or
  20. pause
  21. echo  
  22. echo Renaming classlib\include\strng.h...
  23. ren %1\classlib\include\strng.h %1\classlib\include\strng.bcc
  24. echo Renaming classlib\source\strng.cpp...
  25. ren %1\classlib\source\strng.cpp %1\classlib\source\strng.bcc
  26. echo Copying classlib\lib\tclassl.lib...
  27. copy %1\classlib\lib\tclassl.lib %1\classlib\lib\tclassl.bcc
  28. echo  
  29. echo Copying header and source files...
  30. copy strng.h %1\classlib\include
  31. copy regexp.h %1\classlib\include
  32. copy parsestr.h %1\classlib\include
  33. copy filestr.h %1\classlib\include
  34. copy strng.cpp %1\classlib\source
  35. copy str.cpp %1\classlib\source
  36. copy regexp.cpp %1\classlib\source
  37. copy parsestr.cpp %1\classlib\source
  38. copy filestr.cpp %1\classlib\source
  39. echo  
  40. echo Modifying %1\classlib\lib\tclassl.lib...
  41. %1\bin\tlib %1\classlib\lib\tclassl.lib -strng
  42. %1\bin\tlib %1\classlib\lib\tclassl.lib +strng.lib
  43. del %1\classlib\lib\tclassl.bak
  44. echo  
  45. echo Done.
  46. goto end
  47.  
  48. :uninstall
  49. echo          String++ Uninstall
  50. echo -------------------------------------
  51. if %2!==! goto syntax
  52. if not exist %2\*.* goto badpath2
  53. echo  
  54. echo This will UNINSTALL String++ from
  55. echo the Borland Container Class Library.
  56. echo  
  57. echo Press Ctrl-Break to abort or
  58. pause
  59. echo  
  60. echo Restoring header and source files...
  61. if exist %2\classlib\include\strng.bcc copy %2\classlib\include\strng.bcc %2\classlib\include\strng.h
  62. if exist %2\classlib\include\strng.bcc  del %2\classlib\include\strng.bcc
  63. if exist %2\classlib\include\filestr.h  del %2\classlib\include\filestr.h
  64. if exist %2\classlib\include\parsestr.h del %2\classlib\include\parsestr.h
  65. if exist %2\classlib\include\regexp.h   del %2\classlib\include\regexp.h
  66. if exist %2\classlib\source\strng.bcc   copy %2\classlib\source\strng.bcc %2\classlib\source\strng.cpp
  67. if exist %2\classlib\source\strng.bcc    del %2\classlib\source\strng.bcc
  68. if exist %2\classlib\source\str.cpp      del %2\classlib\source\str.cpp
  69. if exist %2\classlib\source\filestr.cpp  del %2\classlib\source\filestr.cpp
  70. if exist %2\classlib\source\parsestr.cpp del %2\classlib\source\parsestr.cpp
  71. if exist %2\classlib\source\regexp.cpp   del %2\classlib\source\regexp.cpp
  72. echo  
  73. echo Restoring %2\classlib\lib\tclassl.lib...
  74. if exist %2\classlib\lib\tclassl.bcc copy %2\classlib\lib\tclassl.bcc %2\classlib\lib\tclassl.lib
  75. if exist %2\classlib\lib\tclassl.bcc  del %2\classlib\lib\tclassl.bcc
  76. goto end
  77.  
  78. :syntax
  79. echo  
  80. echo Syntax error: 
  81. echo To install String++ to the Bor-
  82. echo land Container Class Library type
  83. echo  
  84. echo   %0 pathname
  85. echo  
  86. echo where pathname is the name of the 
  87. echo Borland C++ directory
  88. echo  
  89. echo To uninstall String++ from the
  90. echo BCCL type
  91. echo  
  92. echo   %0 -u pathname
  93. echo  
  94. echo Examples:
  95. echo   %0 d:\bc
  96. echo   %0 -u d:\bc
  97. goto end
  98.  
  99. :badpath1
  100. echo  
  101. echo Invalid path %1
  102. goto end
  103.  
  104. :badpath2
  105. echo  
  106. echo Invalid path %2
  107.  
  108. :end
  109.